import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'
	import Com from "../views/home/com.vue"
		import Recom from "../views/home/recom.vue"
	import Search from"../views/home/search.vue"
	import Detail from "../views/home/detail.vue"
import Login from "../views/Login.vue"
import Text from "../views/text.vue"
import Enroll from "../views/Enroll.vue"
import Fgpwd from "../views/fgpwd.vue"
import Goorder from"../views/cus/goorder.vue"
import Payment from "../views/cus/payment.vue"
import Adm from "../views/adm/adm.vue"
	import AdmPwd from "../views/Pwd.vue"
	import AdmHead from "../views/Head.vue"
	import Hot from"../views/adm/hot.vue"
	import Addhot from "../views/adm/addhot.vue"
	import Cusshow from "../views/adm/cus/show.vue"
	import Cusadd from "../views/adm/cus/add.vue"
	import Mershow from "../views/adm/mer/show.vue"
	import Meradd from "../views/adm/mer/add.vue"
	import Breed from"../views/adm/com/breed.vue"
	import Type from"../views/adm/com/type.vue"
	import Admcom from"../views/adm/com/commodity.vue"
	import Addbreed from"../views/adm/com/addbreed.vue"
	import Addtype from"../views/adm/com/addtype.vue"
	import Addcom from"../views/adm/com/addcommodity.vue"
	import Admcart from"../views/adm/admcart.vue"
	import Admorder from"../views/adm/admorder.vue"
	import Admremark from"../views/adm/admremark.vue"
	import Addremark from "../views/adm/addremark.vue"
	import Admmyinfo from"../views/myinfo.vue"
import Cus from "../views/cus/cus.vue"
	import Myorders from"../views/cus/Myorders.vue"
	import Mycart from '../views/cus/Mycart.vue'
	import CusPwd from "../views/Pwd.vue"
	import CusHead from "../views/Head.vue"
	import Cusmyinfo from"../views/myinfo.vue"
	import Myremark from "../views/cus/myremark.vue"
	import Cusreply from "../views/replyremark.vue"
import Mer from "../views/mer/mer.vue"
	import MerPwd from "../views/Pwd.vue"
	import MerHead from "../views/Head.vue"
	import Mermyinfo from "../views/myinfo.vue"
	import Merbreed from"../views/mer/type/breed.vue"
	import Meraddbreed from"../views/mer/type/addbreed.vue"
	import Mertype from "../views/mer/type/type.vue"
	import Meraddtype from"../views/mer/type/addtype.vue"
	import Mercom from"../views/mer/commodity.vue"
	import Meraddcom from "../views/mer/addcom.vue"
	import Merorder from"../views/mer/order.vue"
	import Merremark from"../views/mer/remark.vue"
	import Merreply from"../views/replyremark.vue"
const routes=[//定义路由表
	{
		path:"/home",
		component:Home,
		children:[{
			path:"com",
			component:Com,
			children:[{
					path:'recom',
					component:Recom
				}]
			},{
			path:'search',
			component:Search
			},{
			path:"detail",
			component:Detail
			}]
	},
	{
		path:"/login",
		component:Login
	},{
		path:"/fgpwd",
		component:Fgpwd
	},{
		path:"/goorder",
		component:Goorder
	},{
		path:"/payment",
		component:Payment
	},
	{
		path:"/text",
		component:Text
	},{
		path:"/enroll",
		component:Enroll
	},{
		path:"/adm",
		component:Adm,
		children:[{
			path:"pwd",
			component:AdmPwd
		},{
			path:"head",
			component:AdmHead
		},{
			path:"hot",
			component:Hot
		},{
			path:"addhot",
			component:Addhot
		},{
			path:"cusshow",
			component:Cusshow
		},{
			path:"cusadd",
			component:Cusadd
		},{
			path:"mershow",
			component:Mershow
		},{
			path:"meradd",
			component:Meradd
		},{
			path:"breed",
			component:Breed
		},{
			path:"type",
			component:Type
		},{
			path:"com",
			component:Admcom
		},{
			path:"addbreed",
			component:Addbreed
		},{
			path:"addtype",
			component:Addtype
		},{
			path:"addcom",
			component:Addcom
		},{
			path:"admcart",
			component:Admcart
		},{
			path:"admorder",
			component:Admorder
		},{
			path:"admremark",
			component:Admremark
		},{
			path:"addremark",
			component:Addremark
		},{
			path:"adminfo",
			component:Admmyinfo
		}]
	},{
		path:"/cus",
		component:Cus,
		children:[{
			path:"myorders",
			component:Myorders
			},{
			path:"mycart",
			component:Mycart
			},{
			path:"pwd",
			component:CusPwd
			},{
			path:"head",
			component:CusHead
			},{
			path:"cusinfo",
			component:Cusmyinfo
			},{
			path:"myremark",
			component:Myremark
			},{
			path:"cusreply",
			component:Cusreply
			}]
	},{
		path:"/mer",
		component:Mer,
		children:[{
			path:"pwd",
			component:MerPwd
		},{
			path:"head",
			component:MerHead
		},{
			path:"merinfo",
			component:Mermyinfo
		},{
			path:"merbreed",
			component:Merbreed
		},{
			path:"meraddbreed",
			component:Meraddbreed
		},{
			path:"mertype",
			component:Mertype
		},{
			path:"meraddtype",
			component:Meraddtype
		},{
			path:"mercom",
			component:Mercom
		},{
			path:"meraddcom",
			component:Meraddcom
		},{
			path:"merorder",
			component:Merorder
		},{
			path:"merremark",
			component:Merremark
		},{
			path:"merreply",
			component:Merreply
		}]
	}]
const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes
})

// export 暴露出来 为import做准备（暴露路由表）
export default router